package l1j.server.server.model.skill.skillmode;

import l1j.server.server.model.L1Character;
import l1j.server.server.model.L1Magic;
import l1j.server.server.model.Instance.L1NpcInstance;
import l1j.server.server.model.Instance.L1PcInstance;
import l1j.server.server.model.skill.L1SkillId;

/**
 * 武器破壞者
 * @author dexc
 *
 */
public class ARM_BREAKER extends SkillMode {

	public ARM_BREAKER() {
	}

	@Override
	public int start(final L1PcInstance srcpc, final L1Character cha, final L1Magic magic, final int integer) throws Exception {
		final int dmg = magic.calcMagicDamage(L1SkillId.ARM_BREAKER);

		if (!cha.hasSkillEffect(L1SkillId.DMGUP2)) {
			cha.setSkillEffect(L1SkillId.DMGUP2, integer * 1000);
			cha.addDmgup(-2);
		}
		
		return dmg;
	}

	@Override
	public int start(final L1NpcInstance npc, final L1Character cha, final L1Magic magic,
			final int integer) throws Exception {
		final int dmg = 0;
		
		return dmg;
	}

	@Override
	public void start(final L1PcInstance srcpc, final Object obj) throws Exception {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void stop(final L1Character cha) throws Exception {
		cha.addDmgup(2);
	}
}
